package com.example.mobile2021606163crw0510;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.fragment.app.Fragment;

public class ZichangFragment extends Fragment {

    // TODO: Rename parameter arguments, choose names that match
    // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
    private static final String ARG_PARAM1 = "param1";
    private static final String ARG_PARAM2 = "param2";

    // TODO: Rename and change types of parameters
    private String mParam1;
    private String mParam2;
    private ImageView imgTesila;
    private ImageView imgRichan;
    private TextView tvMaintesila;
    private TextView tvMainrichang;
    private TextView tvAll;


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view =  inflater.inflate(R.layout.fragment_zichang, container, false);
        initView(view);
        return view;
    }

    @Override
    public void onStart() {
        super.onStart();
        tvAll.setText("名下车辆：");
        tvMaintesila.setText("粤E 12345            ETC余额：2000");
        tvMainrichang.setText("粤E 56789            ETC余额：200");
    }

    private void initView(View view) {
        imgTesila = (ImageView) view.findViewById(R.id.img_tesila);
        imgRichan = (ImageView) view.findViewById(R.id.img_richan);
        tvMaintesila = (TextView) view.findViewById(R.id.tv_main_tesila);
        tvMainrichang = (TextView) view.findViewById(R.id.tv_main_richang);
        tvAll = (TextView)view.findViewById(R.id.tv_all);
    }
}